<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/pages/home.xhtml">
	<ui:define name="title">
		<h:outputText value="#{text.titSocio}" />
	</ui:define>
	<ui:define name="content">

		<!-- Botoes Top -->
		<p:outputPanel id="pnlButtonsTop" styleClass="btnPanel" layout="block">
			<p:commandButton id="btnSaveTop" value="#{text.btnSave}"
				icon="ui-icon-disk" actionListener="#{socioController.saveSocio}"
				update=":frmContent:panelSocio,:frmContent:btnDeleteTop,:frmContent:btnDeleteBotton"
				oncomplete="handleComplete(xhr, status, args)" />

			<p:commandButton id="btnDeleteTop" value="#{text.btnDelete}"
				icon="ui-icon-trash" onclick="dialogDelete.show()"
				disabled="#{sessionScope.idSocio == null}" immediate="true"
				global="false">
			</p:commandButton>

			<p:button id="btnBackTop" value="#{text.btnBack}"
				outcome="/pages/socio/list.xhtmlselectedMenu=1?selectedMenu=1"
				ajax="false" async="false" icon="ui-icon-arrowreturnthick-1-w" />
		</p:outputPanel>
		<!--  Fim Botoes Top -->

		<p:outputPanel id="panelSocio" legend="#{text.lgdSocio}"
			toggleable="true" binding="#{socioController.panelSocio}">
			<h:inputHidden id="socioId"
				value="#{socioController.selectedSocio.idSocio}" />
			<p:messages id="socioMessages" />

			<p:tabView id="tabViewSocio" widgetVar="tabView">
				<p:tab id="tabSocio" title="#{text.lgdPessoal}">

					<h:panelGrid id="photoPanel" columns="3" cellpadding="5">
						<p:lightBox styleClass="imagebox">
							<h:outputLink value="#">
								<p:graphicImage id="photo" cache="false" width="65" height="75"
									value="#{socioController.photo != null ? socioController.photo : resource['images:anonymous.jpg']}"
									style="border: 1px solid #d6d6d6;padding:5px;" />
							</h:outputLink>
							<f:facet name="inline">
								<p:graphicImage id="largePhoto" cache="false" width="300"
									value="#{socioController.photo != null ? socioController.photo : resource['images:anonymous.jpg']}" />
							</f:facet>
						</p:lightBox>
						<h:panelGroup rendered="#{uploadController.photo != null}">
							<span class="ui-icon ui-icon-arrowreturnthick-1-w" />
							<p:graphicImage id="photoPreview" cache="false" width="65"
								height="75" value="#{uploadController.photoStream}"
								style="border: 1px solid #d6d6d6;padding:5px;" />
						</h:panelGroup>
						<h:panelGroup>
							<h:outputText value="#{message.infoUpload}" />
							<p:fileUpload id="photoUpload" auto="true" mode="advanced"
								widgetVar="upload" label="#{text.btnPhoto}"
								uploadLabel="#{text.btnUpload }"
								cancelLabel="#{text.btnCancel }"
								fileUploadListener="#{uploadController.photoUpload}"
								update="photoPanel"
								allowTypes="/(\.|\/)(gif|jpeg|png|jpg)$/"
								invalidFileMessage="#{message.invalidUploadFile}"
								sizeLimit="4000000"
								invalidSizeMessage="#{message.invalidUploadSize}" />
						</h:panelGroup>

					</h:panelGrid>

					<h:panelGrid id="pnlFields" columns="3">
						<h:outputLabel for="nome" value="#{text.lblSocioNome}" />
						<p:inputText id="nome" required="true" size="50" maxlength="40"
							requiredMessage="#{message.requiredSocioNome}"
							value="#{socioController.selectedSocio.nomeSocio}" />
						<p:message for="nome" />

						<h:outputLabel for="matSocial"
							value="#{text.lblSocioMatriculaSocial}" />
						<p:inputText id="matSocial" size="20" maxlength="10"
							value="#{socioController.selectedSocio.matSocial}" />
						<p:message for="matSocial" />

						<h:outputLabel for="situacao" value="#{text.lblSocioSituacao}" />
						<p:selectOneMenu id="situacao" effect="fade" style="width:150px;"
							value="#{socioController.selectedSocio.situacao}">
							<f:selectItem itemLabel="#{text.lblUnselectCombo}" itemValue="" />
							<f:selectItem itemLabel="#{text.lblSocioSituacaoAtivo}"
								itemValue="A" />
							<f:selectItem itemLabel="#{text.lblSocioSituacaoInativo}"
								itemValue="I" />
							<f:selectItem itemLabel="#{text.lblSocioSituacaoFalecido}"
								itemValue="F" />
						</p:selectOneMenu>
						<p:message for="situacao" />

						<h:outputLabel for="dataAdmissaoCargo"
							value="#{text.lblSocioDataAdmissaoCargo}" />
						<p:calendar id="dataAdmissaoCargo" size="20" maxlength="10"
							navigator="true" pattern="dd/MM/yyyy" showOn="both"
							value="#{socioController.selectedSocio.dataAdmissaoCargo}" />
						<p:message for="dataAdmissaoCargo" />

						<h:outputLabel for="cpf" value="#{text.lblSocioCPF}" />
						<p:inputMask id="cpf" size="20" maxlength="11" mask="99999999999"
							value="#{socioController.selectedSocio.numCpf}" />
						<p:message for="cpf" />

						<h:outputLabel for="identidade" value="#{text.lblSocioIdentidade}" />
						<p:inputMask id="identidade" size="20" maxlength="10"
							mask="9999999999"
							value="#{socioController.selectedSocio.numIdentidade}" />
						<p:message for="identidade" />

						<h:outputLabel for="tituloEleitor"
							value="#{text.lblSocioTituloEleitor}" />
						<p:inputMask id="tituloEleitor" size="20" maxlength="10"
							mask="9999999999"
							value="#{socioController.selectedSocio.numTituloEleitor}" />
						<p:message for="tituloEleitor" />

						<h:outputLabel for="habilitacao"
							value="#{text.lblSocioHabilitacao}" />
						<p:inputMask id="habilitacao" size="20" maxlength="10"
							mask="9999999999"
							value="#{socioController.selectedSocio.numHabilitacao}" />
						<p:message for="habilitacao" />

						<h:outputLabel for="nascimento" value="#{text.lblSocioNascimento}" />
						<p:calendar id="nascimento" size="20" maxlength="10"
							navigator="true" pattern="dd/MM/yyyy" yearRange="c-80:c+0"
							showButtonPanel="true" showOn="both"
							value="#{socioController.selectedSocio.dataNascimento}" />
						<p:message for="nascimento" />

						<h:outputLabel for="localNascimento"
							value="#{text.lblSocioLocalNascimento}" />
						<p:inputText id="localNascimento" size="20" maxlength="10"
							value="#{socioController.selectedSocio.localNascimento}" />
						<p:message for="localNascimento" />

						<h:outputLabel for="nomePai" value="#{text.lblSocioNomePai}" />
						<p:inputText id="nomePai" size="50" maxlength="40"
							value="#{socioController.selectedSocio.nomePai}" />
						<p:message for="nomePai" />

						<h:outputLabel for="nomeMae" value="#{text.lblSocioNomeMae}" />
						<p:inputText id="nomeMae" size="50" maxlength="40"
							value="#{socioController.selectedSocio.nomeMae}" />
						<p:message for="nomeMae" />

						<h:outputLabel for="sexo" value="#{text.lblSocioSexo}" />
						<p:selectOneMenu id="sexo" effect="fade" style="width:150px;"
							value="#{socioController.selectedSocio.sexo}">
							<f:selectItem itemLabel="#{text.lblUnselectCombo}" itemValue="" />
							<f:selectItem itemLabel="#{text.lblSexoMasculino}" itemValue="M" />
							<f:selectItem itemLabel="#{text.lblSexoFeminino}" itemValue="F" />
						</p:selectOneMenu>
						<p:message for="sexo" />

						<h:outputLabel for="tipoSanguineo"
							value="#{text.lblSocioTipoSanguineor}" />
						<p:selectOneMenu id="tipoSanguineo" effect="fade"
							style="width:100px;"
							value="#{socioController.selectedSocio.tipoSanguineo}">
							<f:selectItem itemLabel="#{text.lblUnselectCombo}" itemValue="" />
							<f:selectItem itemLabel="A+" itemValue="A+" />
							<f:selectItem itemLabel="A-" itemValue="A-" />
							<f:selectItem itemLabel="B+" itemValue="B+" />
							<f:selectItem itemLabel="B-" itemValue="B-" />
							<f:selectItem itemLabel="AB+" itemValue="AB+" />
							<f:selectItem itemLabel="AB-" itemValue="AB-" />
							<f:selectItem itemLabel="O+" itemValue="O+" />
							<f:selectItem itemLabel="O-" itemValue="O-" />
						</p:selectOneMenu>
						<p:message for="tipoSanguineo" />

						<h:outputLabel for="estadoCivil"
							value="#{text.lblSocioEstadoCivil}" />
						<p:selectOneMenu id="estadoCivil" effect="fade"
							style="width:200px;"
							value="#{socioController.selectedSocio.estadoCivil}">
							<f:selectItem itemLabel="#{text.lblUnselectCombo}" itemValue="" />
							<f:selectItem itemLabel="#{text.lblEstadoCivilSolteiro}"
								itemValue="S" />
							<f:selectItem itemLabel="#{text.lblEstadoCivilCasado}"
								itemValue="C" />
							<f:selectItem itemLabel="#{text.lblEstadoCivilViuvo}"
								itemValue="V" />
							<f:selectItem itemLabel="#{text.lblEstadoCivilDivorciado}"
								itemValue="D" />
							<f:selectItem itemLabel="#{text.lblEstadoCivilOutros}"
								itemValue="O" />
						</p:selectOneMenu>
						<p:message for="estadoCivil" />

						<h:outputLabel for="observacao" value="#{text.lblSocioObservacao}" />
						<p:inputTextarea id="observacao" cols="50" rows="6"
							value="#{socioController.selectedSocio.txtObservacao}" />
						<p:message for="observacao" />

					</h:panelGrid>

				</p:tab>
				<p:tab id="tabContato" title="#{text.lblContato}">

					<h:panelGrid id="pnlEndereco" columns="3">
						<h:outputLabel for="endLogra" value="#{text.lblEnderecoLogra}" />
						<p:inputText id="endLogra" size="65" maxlength="45"
							value="#{socioController.selectedSocio.endLogra}" />
						<p:message for="endLogra" />

						<h:outputLabel for="endNumero" value="#{text.lblEnderecoNumero}" />
						<p:inputText id="endNumero" size="10" maxlength="10"
							value="#{socioController.selectedSocio.endNumero}" />
						<p:message for="endNumero" />

						<h:outputLabel for="endComplemento"
							value="#{text.lblEnderecoComp}" />
						<p:inputText id="endComplemento" size="40" maxlength="20"
							value="#{socioController.selectedSocio.endCompl}" />
						<p:message for="endComplemento" />

						<h:outputLabel for="endBairro" value="#{text.lblEnderecoBairro}" />
						<p:inputText id="endBairro" size="40" maxlength="20"
							value="#{socioController.selectedSocio.endBairro}" />
						<p:message for="endBairro" />

						<h:outputLabel for="endCidade" value="#{text.lblEnderecoCidade}" />
						<p:inputText id="endCidade" size="40" maxlength="20"
							value="#{socioController.selectedSocio.endCidade}" />
						<p:message for="endCidade" />


						<h:outputLabel for="endUF" value="#{text.lblUF}" />
						<p:selectOneMenu id="endUF"
							value="#{socioController.selectedSocio.uf.id}" effect="fade"
							style="width:100px;">
							<f:selectItem itemLabel="#{text.lblUnselectCombo}" itemValue="" />
							<f:selectItems value="#{socioController.ufList}" var="estado"
								itemLabel="#{estado.siglaUf}" itemValue="#{estado.idUf}" />
						</p:selectOneMenu>
						<p:message for="endUF" />

						<h:outputLabel for="endCEP" value="#{text.lblEnderecoCEP}" />
						<p:inputMask id="endCEP" size="15" maxlength="8" mask="99999999"
							value="#{socioController.selectedSocio.endCep}" />
						<p:message for="endCEP" />
					</h:panelGrid>
					<p:separator />
					<h:panelGrid id="pnlContatoFields" columns="3">
						<h:outputLabel for="phone" value="#{text.lblContatoTelefone}" />
						<h:panelGroup>
							<p:inputMask id="ddd" size="3" maxlength="3"
								value="#{socioController.selectedSocio.telefoneDdd}" />
							<p:spacer width="10px" />
							<p:inputMask id="phone" size="15" maxlength="10"
								mask="9999999999"
								value="#{socioController.selectedSocio.telefoneNumero}" />
						</h:panelGroup>
						<h:panelGroup>
							<p:message for="ddd" />
							<p:message for="phone" />
						</h:panelGroup>

						<h:outputLabel for="comercial" value="#{text.lblContatoComercial}" />
						<h:panelGroup>
							<p:inputMask id="dddComercial" size="3" maxlength="3"
								value="#{socioController.selectedSocio.telefoneTrabalhoDdd}" />
							<p:spacer width="10px" />
							<p:inputMask id="comercial" size="15" maxlength="10"
								mask="9999999999"
								value="#{socioController.selectedSocio.telefoneTrabalhoNumero}" />
						</h:panelGroup>
						<h:panelGroup>
							<p:message for="dddComercial" />
							<p:message for="comercial" />
						</h:panelGroup>


						<h:outputLabel for="celular" value="#{text.lblContatoCelular}" />
						<p:inputMask id="celular" size="15" maxlength="10"
							mask="9999999999"
							value="#{socioController.selectedSocio.telefoneCelular}" />
						<p:message for="celular" />

						<h:outputLabel for="email" value="#{text.lblContatoEmail}" />
						<p:inputText id="email" size="70" maxlength="100"
							mask="9999999999" value="#{socioController.selectedSocio.email}"
							validatorMessage="#{message.invalidEmail}">
							<f:validator validatorId="emailValidate" />
						</p:inputText>
						<p:message for="email" />
					</h:panelGrid>
				</p:tab>

				<p:tab id="tabFuncional" title="#{text.lgdFuncional}">
					<h:panelGrid id="pnlFuncional" columns="3">
						<h:outputLabel for="cargo" value="#{text.lblCargo}" />
						<h:panelGroup>
							<p:inputText id="cargo" size="50" maxlength="30" readonly="true"
								value="#{socioController.selectedSocio.cargo.descCargo}"
								styleClass="inputfield-readonly" />
							<p:spacer width="5px" />
							<p:commandButton icon="ui-icon-search" id="selectCargo"
								update=":frmContent:tabViewSocio:dlgCargo" process="@none"
								oncomplete="dlgCargo.show()" />

							<p:dialog id="dlgCargo" header="#{text.titDlgCargo}"
								appendToBody="false" widgetVar="dlgCargo" modal="false"
								resizable="false" styleClass="dlgSelect" showEffect="drop"
								hideEffect="drop">

								<p:dataTable id="grdCargo" var="cargo"
									value="#{socioController.cargoDataModel}" widgetVar="grdCargo"
									emptyMessage="#{text.grdEmpty}"
									selection="#{socioController.selectedCargo}" paginator="true"
									rows="10" paginatorAlwaysVisible="false"
									paginatorPosition="bottom"
									paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
									style="width:600px;" sortBy="#{cargo.descCargo}"
									filterEvent="enter">

									<p:column selectionMode="single" style="width:18px" />
									<p:column id="colCargoDesc" headerText="#{text.lblCargoDesc}"
										sortBy="#{cargo.descCargo}" filterBy="#{cargo.descCargo}">
										<h:outputText value="#{cargo.descCargo}" />
									</p:column>
									<f:facet name="footer">
										<p:commandButton value="#{text.btnConfirm}"
											oncomplete="dlgCargo.hide();"
											process=":frmContent:tabViewSocio:grdCargo"
											update=":frmContent:tabViewSocio:cargo"
											actionListener="#{socioController.selectCargo}" />
										<p:commandButton value="#{text.btnCancel}" global="false"
											onclick="dlgCargo.hide();" />
									</f:facet>
								</p:dataTable>
							</p:dialog>
						</h:panelGroup>
						<p:message for="cargo" />

						<h:outputLabel for="matFuncional"
							value="#{text.lblSocioMatriculaFuncional}" />
						<p:inputText id="matFuncional" size="20" maxlength="10"
							value="#{socioController.selectedSocio.matFuncional}" />
						<p:message for="matFuncional" />

						<h:outputLabel for="lotacao" value="#{text.lblSocioLotacao}" />
						<p:inputText id="lotacao" size="40" maxlength="20"
							value="#{socioController.selectedSocio.lotacao}" />
						<p:message for="lotacao" />

						<h:outputLabel for="matSiape"
							value="#{text.lblSocioMatriculaSiape}" />
						<p:inputText id="matSiape" size="20" maxlength="10"
							value="#{socioController.selectedSocio.matSiape}" />
						<p:message for="matSiape" />

						<h:outputLabel for="dataAdmissaoSocial"
							value="#{text.lblSocioDataAdmissaoSocial}" />
						<p:calendar id="dataAdmissaoSocial" size="20" maxlength="10"
							navigator="true"
							value="#{socioController.selectedSocio.dataAdmissaoSocial}" />
						<p:message for="dataAdmissaoSocial" />

						<h:outputLabel for="reparticao" value="#{text.lblReparticao}" />
						<h:panelGroup>
							<p:inputText id="reparticao" size="50" maxlength="30"
								readonly="true" styleClass="inputfield-readonly"
								value="#{socioController.selectedSocio.reparticao.descReparticao}" />
							<p:spacer width="5px" />
							<p:commandButton icon="ui-icon-search" id="selectReparticao"
								update=":frmContent:tabViewSocio:dlgCargo"
								oncomplete="dlgReparticao.show()" />

							<p:dialog id="dlgReparticao" header="#{text.titDlgReparticao}"
								appendToBody="false" widgetVar="dlgReparticao" modal="false"
								resizable="false" styleClass="dlgSelect" showEffect="drop"
								hideEffect="drop">

								<p:dataTable id="grdReparticao" var="reparticao"
									value="#{socioController.reparticaoDataModel}"
									widgetVar="grdReparticao" emptyMessage="#{text.grdEmpty}"
									selection="#{socioController.selectedReparticao}"
									paginator="true" rows="10" paginatorPosition="bottom"
									paginatorAlwaysVisible="false"
									paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
									style="width:600px;" sortBy="#{reparticao.descReparticao}"
									filterEvent="enter">

									<p:column selectionMode="single" style="width:18px" />
									<p:column id="colReparticaoName"
										headerText="#{text.lblReparticao}"
										sortBy="#{reparticao.descReparticao}"
										filterBy="#{reparticao.descReparticao}">
										<h:outputText value="#{reparticao.descReparticao}" />
									</p:column>
									<f:facet name="footer">
										<p:commandButton value="#{text.btnConfirm}"
											oncomplete="dlgReparticao.hide();"
											actionListener="#{socioController.selectReparticao}"
											process=":frmContent:tabViewSocio:grdReparticao"
											update=":frmContent:tabViewSocio:reparticao" />
										<p:commandButton value="#{text.btnCancel}" global="false"
											onclick="dlgReparticao.hide();" />
									</f:facet>
								</p:dataTable>
							</p:dialog>
						</h:panelGroup>
						<p:message for="reparticao" />

						<h:outputLabel for="matInstituidor"
							value="#{text.lblSocioMatriculaInstituidor}" />
						<p:inputText id="matInstituidor" size="20" maxlength="10"
							value="#{socioController.selectedSocio.matInstituidor}" />
						<p:message for="matInstituidor" />

						<h:outputLabel for="nomInstituidor"
							value="#{text.lblSocioNomeInstituidor}" />
						<p:inputText id="nomInstituidor" size="55" maxlength="50"
							value="#{socioController.selectedSocio.nomInstituidor}" />
						<p:message for="nomInstituidor" />

					</h:panelGrid>

					<p:separator />

					<h:panelGrid id="pnlBancario" columns="3">
						<h:outputLabel for="nomeBanco" value="#{text.lblSocioBanco}" />
						<p:inputText id="nomeBanco" size="30" maxlength="15"
							value="#{socioController.selectedSocio.nomeBanco}" />
						<p:message for="nomeBanco" />


						<h:outputLabel for="numBanco" value="#{text.lblSocioNumeroBanco}" />
						<p:inputText id="numBanco" size="5" maxlength="3"
							value="#{socioController.selectedSocio.numBanco}" />
						<p:message for="numBanco" />

						<h:outputLabel for="agencia" value="#{text.lblSocioAgencia}" />
						<p:inputText id="agencia" size="10" maxlength="5"
							value="#{socioController.selectedSocio.numAgencia}" />
						<p:message for="agencia" />

						<h:outputLabel for="conta" value="#{text.lblSocioConta}" />
						<p:inputText id="conta" size="20" maxlength="20"
							value="#{socioController.selectedSocio.numConta}" />
						<p:message for="conta" />

					</h:panelGrid>
				</p:tab>
				<p:tab id="tabDependentes" title="#{text.titDependente}">
					<p:dataTable id="grdDependente" var="dependente"
						widgetVar="grdDependente"
						value="#{socioController.dependenteDataModel}"
						emptyMessage="#{text.grdEmpty}" paginator="true"
						paginatorAlwaysVisible="false" rows="10"
						rowsPerPageTemplate="10,25,50" paginatorPosition="bottom"
						paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						style="width:100%;" sortBy="#{dependente.nomeDependente}">
						<f:facet name="header">
							<h:outputText value="#{text.titDependente}" />
						</f:facet>
						<p:column id="colDependenteDesc"
							headerText="#{text.lblDependenteNome}"
							sortBy="#{dependente.nomeDependente}">
							<h:outputText value="#{dependente.nomeDependente}" />
						</p:column>
						<p:column id="colDependenteNascimento"
							headerText="#{text.lblDependenteNascimento}"
							sortBy="#{dependente.dataNascimento}">
							<h:outputText id="colDependenteNascimentoText"
								value="#{dependente.dataNascimento}">
								<f:convertDateTime for="colDependenteNascimentoText"
									pattern="dd/MM/yyyy" />
							</h:outputText>
						</p:column>
						<p:column id="colDependenteParentesco"
							headerText="#{text.lblDependenteParentesco}"
							sortBy="#{dependente.parentesco.descParentesco}">
							<h:outputText value="#{dependente.parentesco.descParentesco}" />
						</p:column>
					</p:dataTable>
				</p:tab>
				<p:tab id="tabBeneficios" title="#{text.titBeneficio}">
					<p:dataTable id="grdBeneficio" var="beneficio"
						widgetVar="grdBeneficio"
						value="#{socioController.beneficioDataModel}"
						emptyMessage="#{text.grdEmpty}" paginator="true"
						paginatorAlwaysVisible="false" rows="10"
						rowsPerPageTemplate="10,25,50" paginatorPosition="bottom"
						paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						style="width:100%;" sortBy="#{beneficio.descBeneficio}">
						<f:facet name="header">
							<h:outputText value="#{text.titBeneficio}" />
						</f:facet>
						<p:column id="colBeneficioCod"
							headerText="#{text.lblBeneficioCodigo}"
							sortBy="#{beneficio.idBeneficio}">
							<h:outputText value="#{beneficio.idBeneficio}" />
						</p:column>
						<p:column id="colBeneficioDesc" headerText="#{text.lblBeneficio}"
							sortBy="#{beneficio.descBeneficio}">
							<h:outputText value="#{beneficio.descBeneficio}" />
						</p:column>
						<p:column id="colBeneficioData"
							headerText="#{text.lblBeneficioData}"
							sortBy="#{beneficio.dataBeneficio}">
							<h:outputText id="colBeneficioDataText"
								value="#{beneficio.dataBeneficio}">
								<f:convertDateTime for="colBeneficioDataText"
									pattern="dd/MM/yyyy" />
							</h:outputText>
						</p:column>
						<p:column id="colBeneficioTipo"
							headerText="#{text.lblBeneficioTipo}"
							sortBy="#{beneficio.tipoBeneficio.descTipo}">
							<h:outputText value="#{beneficio.tipoBeneficio.descTipo}" />
						</p:column>
					</p:dataTable>

				</p:tab>
				<p:tab id="tabMovimentacao" title="Movimentação Mensal">
					<p:dataTable id="grdMovimentacao" var="movimentacao"
						widgetVar="grdMovimentacao"
						value="#{socioController.movimentacaoDataModel}"
						emptyMessage="#{text.grdEmpty}" paginator="true"
						paginatorAlwaysVisible="false" rows="10"
						rowsPerPageTemplate="10,25,50" paginatorPosition="bottom"
						paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						style="width:100%;" sortBy="#{movimentacao.anoMes}">
						<f:facet name="header">
							<h:outputText value="#{text.titMovimentacao}" />
						</f:facet>
						<p:column id="colMovimentacaoDesc"
							headerText="#{text.lblMovimentacaoAnoMes}"
							sortBy="#{movimentacao.anoMes}">
							<h:outputText value="#{movimentacao.anoMes}" />
						</p:column>
						<p:column id="colMovimentacaoRubrica"
							headerText="#{text.lblRubrica}"
							sortBy="#{movimentacao.rubrica.descRubrica}">
							<h:outputText value="#{movimentacao.rubrica.descRubrica}" />
						</p:column>
						<p:column id="colMovimentacaoValorConsignado"
							headerText="#{text.lblMovimentacaoValorConsignado}"
							sortBy="#{movimentacao.valConsignado}">
							<h:outputText value="#{movimentacao.valConsignado}" />
						</p:column>
						<p:column id="colMovimentacaoValorDescontado"
							headerText="#{text.lblMovimentacaoValorDescontado}"
							sortBy="#{movimentacao.ruprica.indDescontado}">
							<h:outputText value="#{movimentacao.indDescontado}" />
						</p:column>
					</p:dataTable>
				</p:tab>
			</p:tabView>


		</p:outputPanel>

		<p:outputPanel id="pnlButtonsBotton" styleClass="btnPanel"
			layout="block">
			<p:commandButton id="btnSaveBotton" value="#{text.btnSave}"
				icon="ui-icon-disk" actionListener="#{socioController.saveSocio}"
				update=":frmContent:panelSocio,:frmContent:btnDeleteTop,:frmContent:btnDeleteBotton"
				oncomplete="handleComplete(xhr, status, args)" />

			<p:commandButton id="btnDeleteBotton" value="#{text.btnDelete}"
				icon="ui-icon-trash" onclick="dialogDelete.show()"
				disabled="#{sessionScope.idSocio == null}" global="false"
				immediate="true" />

			<p:confirmDialog id="dlgConfirmDelete" widgetVar="dialogDelete"
				closable="true" severity="info" appendToBody="true"
				header="#{text.dlgConfirm}" message="#{message.confirmDelete}"
				width="400">
				<p:commandButton id="btnConfirmDelete"
					action="#{socioController.deleteSocio}" value="#{text.btnConfirm}"
					icon="ui-icon-check" oncomplete="dialogDelete.hide()"
					update=":frmContent:panelSocio" immediate="true">
					<f:param name="redirect" value="true" />
				</p:commandButton>
				<p:commandButton id="btnDeclineDelete" onclick="dialogDelete.hide()"
					value="#{text.btnCancel}" icon="ui-icon-cancel" />
			</p:confirmDialog>

			<p:button id="btnBackBotton" value="#{text.btnBack}"
				outcome="/pages/socio/list.xhtml?selectedMenu=1" ajax="false"
				async="false" icon="ui-icon-arrowreturnthick-1-w" />

		</p:outputPanel>

		<script type="text/javascript">
			function handleComplete(xhr, status, args) {
				if (!args.validationFailed) {
					$(PrimeFaces.escapeClientId("frmContent:socioMessages"))
							.remove();
				}
			}
		</script>

	</ui:define>
</ui:composition>

</html>